
<%@ page import="activity.*" %>
<!DOCTYPE html>
<html>
	<head>
            <meta name="layout" content="backend">
		<g:set var="entityName" value="${message(code: 'register.label', default: 'Register')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<div class="gnav" role="navigation">
			<ul>
                            <li><g:link class="list" action="list" params="[eventId:registerInstance.event.id]"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
                            <!--<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>-->
			</ul>
		</div>
		<div id="show-register" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list register">
			
				<g:if test="${registerInstance?.serial}">
				<li class="fieldcontain">
					<span id="serial-label" class="property-label"><g:message code="register.serial.label" default="Serial" /></span>
					
						<span class="property-value" aria-labelledby="serial-label"><g:link controller="serial" action="show" id="${registerInstance?.serial?.id}">${registerInstance?.serial?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
				<g:if test="${registerInstance?.event}">
				<li class="fieldcontain">
					<span id="event-label" class="property-label"><g:message code="register.event.label" default="Event" /></span>
					
						<span class="property-value" aria-labelledby="event-label"><g:link controller="event" action="show" id="${registerInstance?.event?.id}">${registerInstance?.event?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
<!--Reader-->
                                <g:if test="${false}">    
                                <//g:if test="${registerInstance?.reader}">
                                    <li class="fieldcontain">
                                        <span id="reader-label" class="property-label"><g:message code="register.reader.label" default="Reader" /></span>
                                        <span class="property-value" aria-labelledby="reader-label"><g:link controller="reader" action="show" id="${registerInstance?.reader?.id}">${registerInstance?.reader?.encodeAsHTML()}</g:link></span>
                                    </li>
                                </g:if>
                                <g:set var="readerInstance" value="${registerInstance?.reader}" />
                                    <g:if test="${readerInstance?.name}">
                                            <li class="fieldcontain">
                                                <span id="name-label" class="property-label"><g:message code="reader.name.label" default="Name" /></span>
                                                <g:if test="${session.accountId == '1'}">
                                                <span class="property-value" aria-labelledby="reader-label"><g:link controller="reader" action="show" id="${registerInstance?.reader?.id}">${registerInstance?.reader?.encodeAsHTML()}</g:link></span>
                                                </g:if>
                                                <g:else>
                                                    <span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${readerInstance}" field="name"/></span>
                                                </g:else>
                                            </li>
                                        </g:if>

                                        <g:if test="${readerInstance?.gender}">
                                            <li class="fieldcontain">
                                                <span id="gender-label" class="property-label"><g:message code="reader.gender.label" default="Gender" /></span>

                                                <span class="property-value" aria-labelledby="gender-label"><g:fieldValue bean="${readerInstance}" field="gender"/></span>

                                            </li>
                                        </g:if>

                                        <g:if test="${readerInstance?.birth}">
                                            <li class="fieldcontain">
                                                <span id="birth-label" class="property-label"><g:message code="reader.birth.label" default="Birth" /></span>

                                                <span class="property-value" aria-labelledby="birth-label"><g:formatDate date="${readerInstance?.birth}" /></span>

                                            </li>
                                        </g:if>

                                        <g:if test="${readerInstance?.CID}">
                                            <li class="fieldcontain">
                                                <span id="CID-label" class="property-label"><g:message code="reader.CID.label" default="CID" /></span>

                                                <span class="property-value" aria-labelledby="CID-label"><g:fieldValue bean="${readerInstance}" field="CID"/></span>

                                            </li>
                                        </g:if>

                                        <g:if test="${readerInstance?.service}">
                                            <li class="fieldcontain">
                                                <span id="service-label" class="property-label"><g:message code="reader.service.label" default="Service" /></span>

                                                <span class="property-value" aria-labelledby="service-label"><g:fieldValue bean="${readerInstance}" field="service"/></span>

                                            </li>
                                        </g:if>

                                        <g:if test="${readerInstance?.title}">
                                            <li class="fieldcontain">
                                                <span id="title-label" class="property-label"><g:message code="reader.title.label" default="Title" /></span>

                                                <span class="property-value" aria-labelledby="title-label"><g:fieldValue bean="${readerInstance}" field="title"/></span>

                                            </li>
                                        </g:if>

                                        <g:if test="${readerInstance?.tel1}">
                                            <li class="fieldcontain">
                                                <span id="tel1-label" class="property-label"><g:message code="reader.tel1.label" default="Tel1" /></span>

                                                <span class="property-value" aria-labelledby="tel1-label"><g:fieldValue bean="${readerInstance}" field="tel1"/></span>

                                            </li>
                                        </g:if>

                                        <g:if test="${readerInstance?.tel2}">
                                            <li class="fieldcontain">
                                                <span id="tel2-label" class="property-label"><g:message code="reader.tel2.label" default="Tel2" /></span>

                                                <span class="property-value" aria-labelledby="tel2-label"><g:fieldValue bean="${readerInstance}" field="tel2"/></span>

                                            </li>
                                        </g:if>

                                        <g:if test="${readerInstance?.email1}">
                                            <li class="fieldcontain">
                                                <span id="email1-label" class="property-label"><g:message code="reader.email1.label" default="Email1" /></span>

                                                <span class="property-value" aria-labelledby="email1-label"><g:fieldValue bean="${readerInstance}" field="email1"/></span>

                                            </li>
                                        </g:if>

                                        <g:if test="${readerInstance?.email2}">
                                            <li class="fieldcontain">
                                                <span id="email2-label" class="property-label"><g:message code="reader.email2.label" default="Email2" /></span>

                                                <span class="property-value" aria-labelledby="email2-label"><g:fieldValue bean="${readerInstance}" field="email2"/></span>

                                            </li>
                                        </g:if>

                                        <g:if test="${readerInstance?.custom1}">
                                            <li class="fieldcontain">
                                                <span id="custom1-label" class="property-label"><g:message code="reader.custom1.label" default="Custom1" /></span>

                                                <span class="property-value" aria-labelledby="custom1-label"><g:fieldValue bean="${readerInstance}" field="custom1"/></span>

                                            </li>
                                        </g:if>

                                        <g:if test="${readerInstance?.custom2}">
                                            <li class="fieldcontain">
                                                <span id="custom2-label" class="property-label"><g:message code="reader.custom2.label" default="Custom2" /></span>

                                                <span class="property-value" aria-labelledby="custom2-label"><g:fieldValue bean="${readerInstance}" field="custom2"/></span>

                                            </li>
                                        </g:if>

                                        <g:if test="${readerInstance?.live}">
                                            <li class="fieldcontain">
                                                <span id="live-label" class="property-label"><g:message code="reader.live.label" default="Live" /></span>

                                                <span class="property-value" aria-labelledby="live-label"><g:fieldValue bean="${readerInstance}" field="live"/></span>

                                            </li>
                                        </g:if>

                                        <g:if test="${readerInstance?.food}">
                                            <li class="fieldcontain">
                                                <span id="food-label" class="property-label"><g:message code="reader.food.label" default="Food" /></span>

                                                <span class="property-value" aria-labelledby="food-label"><g:fieldValue bean="${readerInstance}" field="food"/></span>

                                            </li>
                                        </g:if>

                                        <g:if test="${readerInstance?.memo}">
                                            <li class="fieldcontain">
                                                <span id="memo-label" class="property-label"><g:message code="reader.memo.label" default="Memo" /></span>

                                                <span class="property-value" aria-labelledby="memo-label"><g:fieldValue bean="${readerInstance}" field="memo"/></span>

                                            </li>
                                        </g:if>
<!--Reader-->                                
                                <g:if test="${registerInstance?.goup}">
				<li class="fieldcontain">
					<span id="goup-label" class="property-label"><g:message code="register.goup.label" default="Goup" /></span>
					
						<span class="property-value" aria-labelledby="goup-label"><g:fieldValue bean="${registerInstance}" field="goup"/></span>
					
				</li>
				</g:if>
			
                                <//g:if test="${registerInstance?.CID}">
                                <g:if test="${false}">
				<li class="fieldcontain">
					<span id="CID-label" class="property-label"><g:message code="register.CID.label" default="CID" /></span>
					
						<span class="property-value" aria-labelledby="CID-label"><g:fieldValue bean="${registerInstance}" field="CID"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${registerInstance?.cancelCode}">
				<li class="fieldcontain">
					<span id="cancelCode-label" class="property-label"><g:message code="register.cancelCode.label" default="Cancel Code" /></span>
					
						<span class="property-value" aria-labelledby="cancelCode-label"><g:fieldValue bean="${registerInstance}" field="cancelCode"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${registerInstance?.regTime}">
				<li class="fieldcontain">
					<span id="regTime-label" class="property-label"><g:message code="register.regTime.label" default="Reg Time" /></span>
					
						<span class="property-value" aria-labelledby="regTime-label"><g:formatDate date="${registerInstance?.regTime}" /></span>
					
				</li>
				</g:if>
                                
                                <g:if test="${registerInstance?.status}">
				<li class="fieldcontain">
                                    <span id="status-label" class="property-label"><g:message code="register.status.label" default="Status" /></span>
                                    <span class="property-value" aria-labelledby="status-label"><g:fieldValue bean="${registerInstance}" field="status"/></span>
				</li>
				</g:if>

                                <g:if test="${registerInstance?.present}">
                                    <li class="fieldcontain">
                                        <span id="present-label" class="property-label"><g:message code="register.present.label" default="Present" /></span>
                                        <span class="property-value" aria-labelledby="present-label"><g:fieldValue bean="${registerInstance}" field="present"/></span>
                                    </li>
                                </g:if>

                                <g:if test="${registerInstance?.lastUpdated}">
                                        <li class="fieldcontain">
                                            <span id="present-label" class="property-label"><g:message code="register.lastUpdated.label" default="最後異動" /></span>
                                            <span class="property-value" aria-labelledby="present-label"><g:formatDate date="${registerInstance.lastUpdated}" /></span>
                                        </li>
                                    </g:if>

                        </ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${registerInstance?.id}" />
					<g:link class="edit" action="edit" id="${registerInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
                                        <g:if test="${session?.accountId == '1'}">
                                            <g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
                                        </g:if>
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
